package action;

import com.opensymphony.xwork2.ActionSupport;

public class Usuario extends ActionSupport {

	private static final long serialVersionUID = 1L;
	
	private String userlogin;
	private String userpwd;
	private String usernombre;
	
	public String execute(){
		String ir = ERROR;//error
		if(getUserlogin().equals("admin") && getUserpwd().equals("admin")){
			setUsernombre("Es el administrador");
			ir=SUCCESS;//success
		}
		
		return ir;
	}
	
	
	public String getUserlogin() {
		return userlogin;
	}
	public void setUserlogin(String userlogin) {
		this.userlogin = userlogin;
	}
	public String getUserpwd() {
		return userpwd;
	}
	public void setUserpwd(String userpwd) {
		this.userpwd = userpwd;
	}
	public String getUsernombre() {
		return usernombre;
	}
	public void setUsernombre(String usernombre) {
		this.usernombre = usernombre;
	}

}
